/*
* Copyright (C) 2009-2012 - Roman Kalynchuk
*
* This file is part of REngine.
*
* REngine is free software: you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
* the Free Software Foundation, either version 3 of the License, or
* (at your option) any later version.
*
* REngine is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
* GNU General Public License for more details.
*
* You should have received a copy of the GNU General Public License
* along with REngine.  If not, see <http://www.gnu.org/licenses/>.
*/

#include "kernel/kerneltypes.h"
#include "inputsystem.h"
#include "sdl/inputsystemsdl.h"

namespace rengine3d {

	CInputSystem::CInputSystem(IRenderDriver* renderDriver){
	#ifdef  USE_SDL
		m_inputSystem = new CInputSystemSDL(renderDriver);
	#else

	#endif

	}

	CInputSystem::~CInputSystem(){
		SafeDelete(m_inputSystem);
	}

	string_t CInputSystem::GetName(void) {
		return m_inputSystem->GetName();
	}

	string_t CInputSystem::GetDescription(void) {
		return m_inputSystem->GetDescription();
	}

	string_t CInputSystem::GetVersion(void) {
		return m_inputSystem->GetVersion();
	}

	bool CInputSystem::Init(void) {
		return m_inputSystem->Init();
	}

	void CInputSystem::Shutdown(void) {
		m_inputSystem->Shutdown();
	}

	void CInputSystem::AddAction(IInputAction* action) {
		m_inputSystem->AddAction(action);
	}

	IInputAction* CInputSystem::GetAction(string_t name) {
		return m_inputSystem->GetAction(name);
	}

	bool CInputSystem::RemoveAction(string_t name) {
		return m_inputSystem->RemoveAction(name);
	}

	bool CInputSystem::CheckAction(const string_t name) {
		return m_inputSystem->CheckAction(name);
	}

	IKeyboardDevice* CInputSystem::GetKeyboardDevice(void) {
		return m_inputSystem->GetKeyboardDevice();
	}

	IMouseDevice* CInputSystem::GetMouseDevice(void) {
		return m_inputSystem->GetMouseDevice();
	}

	void CInputSystem::OnUpdate(real timeStep) {
		m_inputSystem->OnUpdate(timeStep);
	}


}

